
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemAdminRequest struct {

	Account string `json:"account" form:"account"`

	HeadPic string `json:"head_pic" form:"head_pic"`

	Pwd string `json:"pwd" form:"pwd"`

	RealName string `json:"real_name" form:"real_name"`

	Roles string `json:"roles" form:"roles"`

	LastIp string `json:"last_ip" form:"last_ip"`

	LastTime string `json:"last_time" form:"last_time"`

	AddTime string `json:"add_time" form:"add_time"`

	LoginCount string `json:"login_count" form:"login_count"`

	Level string `json:"level" form:"level"`

	Status string `json:"status" form:"status"`

	DivisionId string `json:"division_id" form:"division_id"`

	IsDel string `json:"is_del" form:"is_del"`

}

func (r *SystemAdminRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemAdminRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"account": "required",

		"head_pic": "required",

		"pwd": "required",

		"real_name": "required",

		"roles": "required",

		"last_ip": "required",

		"last_time": "required",

		"add_time": "required",

		"login_count": "required",

		"level": "required",

		"status": "required",

		"division_id": "required",

		"is_del": "required",

	}
}

func (r *SystemAdminRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemAdminRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemAdminRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
